Skip to content

feat: API specs update for version latest#54

Merged
ChiragAgg5k merged 1 commit intomainfrom
feat-latest-specs
Apr 16, 2026
Merged

feat: API specs update for version latest#54
ChiragAgg5k merged 1 commit intomainfrom
feat-latest-specs

Conversation

@appwrite-specs
Copy link
Copy Markdown

This PR contains API specification updates for version latest.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 16, 2026

Greptile Summary

Adds a type discriminator field to the providerRepositoryFrameworkList and providerRepositoryRuntimeList schemas in both the OpenAPI 3 and Swagger 2 specs, enabling clients to distinguish between the two list variants returned by the provider repository endpoint. The OpenAPI 3 spec uses the standard discriminator object; the Swagger 2 spec appropriately falls back to the x-discriminator extension since Swagger 2 lacks native anyOf discriminator support.

Confidence Score: 5/5

Safe to merge; only P2 style suggestions remain.

All findings are P2 (missing enum constraints on the type discriminator property). The structural changes — adding type to both schemas, marking it required, adding examples, and wiring up the discriminator block — are correct and consistent across both spec formats. No logic errors or breaking changes.

No files require special attention.

Important Files Changed

Filename Overview
specs/latest/open-api3-latest-console.json Adds type discriminator property to providerRepositoryFrameworkList and providerRepositoryRuntimeList schemas, and wires up a discriminator block on the anyOf response schema; type lacks enum constraints despite the discriminator relying on fixed values.
specs/latest/swagger2-latest-console.json Mirrors OpenAPI 3 changes for Swagger 2 format; uses x-discriminator extension (non-standard but acceptable for Swagger 2.0); same missing enum constraint on type property.

Reviews (1): Last reviewed commit: "chore: update API specs and SDK examples" | Re-trigger Greptile

@ChiragAgg5k ChiragAgg5k merged commit 095d750 into main Apr 16, 2026
2 checks passed
Comment on lines 71432 to +71436
}
},
"required": [
"total",
"frameworkProviderRepositories"
"frameworkProviderRepositories",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Missing enum on discriminator property

The type field in both providerRepositoryFrameworkList and providerRepositoryRuntimeList is declared as a plain string with no enum constraint. Since the discriminator.mapping relies on exactly "framework" and "runtime" as the valid values, a schema validator will accept any arbitrary string for type (e.g. "type": "foo") without error — defeating the intent of the discriminator. Adding enum makes the contract explicit and enables correct validation:

Suggested change
}
},
"required": [
"total",
"frameworkProviderRepositories"
"frameworkProviderRepositories",
"type": {
"type": "string",
"description": "Provider repository list type.",
"enum": ["framework"],
"x-example": "framework"
}

The same applies to providerRepositoryRuntimeList ("enum": ["runtime"]).

Comment on lines 71138 to +71142
}
},
"required": [
"total",
"frameworkProviderRepositories"
"frameworkProviderRepositories",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Missing enum on discriminator property (Swagger 2)

Same issue as in the OpenAPI 3 spec: type in both providerRepositoryFrameworkList and providerRepositoryRuntimeList accepts any string, while the x-discriminator mapping only intends "framework" and "runtime" as valid values. Adding "enum": ["framework"] / "enum": ["runtime"] would make the constraints machine-readable and consistent with the discriminator mapping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant